﻿@model TravelWeb.Models.Schedule

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Schedule</legend>

        @Html.HiddenFor(model => model.ScheduleID)

        <div class="editor-label">
            @Html.LabelFor(model => model.ScheduleName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ScheduleName)
            @Html.ValidationMessageFor(model => model.ScheduleName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TourID, "Tour")
        </div>
        <div class="editor-field">
            @Html.DropDownList("TourID", String.Empty)
            @Html.ValidationMessageFor(model => model.TourID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TransportationID, "Transportation")
        </div>
        <div class="editor-field">
            @Html.DropDownList("TransportationID", String.Empty)
            @Html.ValidationMessageFor(model => model.TransportationID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ConfirmDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ConfirmDate)
            @Html.ValidationMessageFor(model => model.ConfirmDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StartDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StartDate)
            @Html.ValidationMessageFor(model => model.StartDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EndDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.EndDate)
            @Html.ValidationMessageFor(model => model.EndDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.numOfCustomer)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.numOfCustomer)
            @Html.ValidationMessageFor(model => model.numOfCustomer)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PromotionID, "Promotion")
        </div>
        <div class="editor-field">
            @Html.DropDownList("PromotionID", String.Empty)
            @Html.ValidationMessageFor(model => model.PromotionID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.MaxCustomer)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MaxCustomer)
            @Html.ValidationMessageFor(model => model.MaxCustomer)
        </div>
        
        @Html.HiddenFor(model => model.Status)

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
